<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="/common/_container :: htmlhead"></head>
<body>
<div class="ibox float-e-margins">
	<div class="ibox-content">
		<div class="form-horizontal">
			
			<input type="hidden" id="id" th:value="${partType.id}"/>
			<input type="hidden" id="typePartitionValue" th:value="${partType.typePartition}"/>

			<div class="row">
				<div class="col-sm-6 ">
					<div class="form-group">
					    <label class="col-sm-3 control-label">类型名称				    
					    	<span style="color: red">*</span>
					    </label>
					    <div class="col-sm-9">
					        <input class="form-control" id="ptypeName" type="text" th:value="${partType.ptypeName}"/>
					    </div>
					</div>
					<div class="hr-line-dashed"></div>
				</div>
				<div class="col-sm-6 b-r">
					<div class="form-group">
					    <label class="col-sm-3 control-label">父级编号				  
					    	<span style="color: red">*</span>
					    </label>
					    <div class="col-sm-9">
					        <input class="form-control" id="ptypeParentName" readonly="readonly" th:value="${partType.ptypeParent}"
					               onclick="PartTypeInfoDlg.showMenuSelectTree(); return false;" style="background-color: #ffffff !important;"/>					        
					            <input class="form-control" type="hidden" id="ptypeParent" />
					            <div id="pcodeTreeDiv" style="display: none; position: absolute; z-index: 200;">
					                <ul id="pcodeTree" class="ztree tree-box" style="width:244px !important;"></ul>
					            </div>
					    </div>
					</div>
					<div class="hr-line-dashed"></div>
				</div>
				<div class="col-sm-6 ">
					<div class="form-group">
					    <label class="col-sm-3 control-label">类型划分					    
					    	<span style="color: red">*</span>
					    </label>
					    <div class="col-sm-9">
					        <select class="form-control" id="typePartition">
					        	<option value="0">类型</option>
					            <option value="1">区域</option>
								<option value="2">智能</option>
					        </select>					       
					    </div>
					</div>
					<div class="hr-line-dashed"></div>
				</div>
				
				
					<div class="col-sm-6">
					<div class="form-group">
					    <label class="col-sm-3 control-label">描述			    
					    	<span style="color: red">*</span>
					    </label>
					    <div class="col-sm-9">
					        <input class="form-control" id="ptypeDescription" type="text" th:value="${partType.ptypeDescription}"/>
					    </div>
					</div>
					<div class="hr-line-dashed"></div>
				</div>
				
				
				
				<div class="col-sm-6">
					<div class="form-group">
					    <label class="col-sm-3 control-label">类型编号			    
					    	<span style="color: red">*</span>
					    </label>
					    <div class="col-sm-9">
					        <input class="form-control" id="ptypeNo" type="text" th:value="${partType.ptypeNo}"/>
					    </div>
					</div>
					<div class="hr-line-dashed"></div>
				</div>

			<!-- 
				<div class="col-sm-6">
					<div class="form-group">
					    <label class="col-sm-3 control-label">主配件id				    
					    	<span style="color: red">*</span>
					    </label>
					    <div class="col-sm-9">
					        <input class="form-control" id="mainPartId" type="text" th:value="${partType.mainPartId}"/>
					    </div>
					</div>
					<div class="hr-line-dashed"></div>
				</div>
				 -->
				
				<div class="col-sm-6 b-r">                                       
                    <div class="form-group">
						<label class="col-sm-3 control-label head-scu-label">APP展示图标</label>
						<div class="col-sm-4">
							<div id="${id}PreId">
								<div>
									  <img width="100px" height="100px" id="avatarPreId" th:if="${partType.fback==null}" src=""/> 
									  <img width="100px" height="100px" id="avatarPreId" th:if="${partType.fback!=null}" th:src="${partType.fback}"/> 
								</div>
 
							</div>
						</div>
						<div class="col-sm-2">
							<div class="head-scu-btn upload-btn" id="avatarBtnId" onclick="PartTypeInfoDlg.selectFile()">
								<i class="fa fa-upload"></i>&nbsp; 
							</div>
						</div>
						<input type="file" id="fileUploadBtn" style="display:none" accept="gif,jpg,jpeg,bmp,png" onchange="PartTypeInfoDlg.uploadFile()"/>
						<input type="hidden" id="fback" />  
					</div>
					<div class="hr-line-dashed"></div>
                </div>
				
				
			</div>
			<div class="row btn-group-m-t">
				<div class="col-sm-10">
	               	 <button type="button" class="btn btn-info" id="ensure" onclick="PartTypeInfoDlg.editSubmit()" >
						   <i class="fa fa-check"></i>&nbsp;提交
					</button>
					<button type="button" class="btn btn-danger"  id="cancel" onclick="PartTypeInfoDlg.close()" >
						   <i class="fa fa-eraser"></i>&nbsp;取消
					</button>                   
                </div>
			</div>

		</div>

	</div>
</div>
<script th:src="@{/static/modular/part/part_type/part_type_info.js}"></script>
</body>
</html>
